/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.qframe.client.quicklet;

import org.qframe.client.quicklet.beans.RenderedQuicklet;

/**
 *
 * @author gprasad
 */
public class QuickletLoader {

    public void initializeQHandler(RenderedQuicklet quicklet) {
        String quickletId = quicklet.getQuickletId();
        String slotId = quicklet.getContainerSlot() == null
                ? "-UnDefined-"
                : quicklet.getContainerSlot().getSlotId();
        IQHandler handlerInst = QuickletFactory.get(quickletId, slotId);
        QuickletContext context = new QuickletContext(quicklet);
        handlerInst.onQuickletLoad(context);

    }
}
